<template>
  <div>
    <div class="container">
      <!-- <div class="title">{{ resActivityInfo.messageTitle }}</div>
      <div class="time">{{ resActivityInfo.createTime }}</div>
      <div class="textInfo" v-html="inforData"></div> -->
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      imgUrl: this.$imgFileRoute,
      id: "",
      resActivityInfo: "",
      inforData: "", //详细内容富文本
    };
  },
  onLoad(option) {
    this.id = option.id;
  },
  mounted() {
    // this.reqActivityGetInfo();
  },
  methods: {
    reqActivityGetInfo() {
      this.$api
        .apiMessageGetInfo({
          id: this.id,
        })
        .then((res) => {
          this.resActivityInfo = res.data;
          this.inforData = res.data.content;
          //更改富文本图片尺寸大小
          const regex = new RegExp("<img", "gi");
          this.inforData = this.inforData.replace(
            regex,
            `<img style="max-width: 100%; height: auto"`
          );
        });
    },
  },
};
</script>

<style scoped>
.container {
  padding: 20px;
}
.title {
  font-size: 18px;
  font-weight: 500;
  color: #282828;
  padding-bottom: 29px;
}
.time {
  font-size: 12px;
  font-weight: 300;
  color: #666666;
  padding-bottom: 10px;
}
.textInfo {
  font-size: 14px;
  font-weight: 300;
  color: #282828;
  line-height: 24px;
  margin-top: 15px;
}
</style>
